package cn.tedu.jws.admin.controller;

import cn.tedu.jws.admin.pojo.vo.TeemEmployListItemVO;
import cn.tedu.jws.admin.service.TeemEmployService;
import cn.tedu.jws.admin.web.JsonResult;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@Slf4j
@RestController
@RequestMapping("/jws/admin/teem")
@Api(tags="05.员工管理模块")
public class TeemEmployController {

    @Autowired
    private TeemEmployService teemEmployService;

    //http:lcoalhost:9080/teem
    @PostMapping("")
    @ApiOperation("添加业主")
    @ApiOperationSupport(order = 100)
    public JsonResult<List<TeemEmployListItemVO>> list(){
        log.debug("开始处理【团队管理-员工列表】的请求,无参数");
        List<TeemEmployListItemVO> list = teemEmployService.list();
        return JsonResult.ok(list);
    }
}
